---
title: PolicyActivityPopup note capture
summary: Captures Category/Type (or free-form) and note text for a Policy Activity note, with Save, Save-and-Email, and Cancel options.
status: draft
owner: <owner>
last_reviewed: 2026-08-21
library: SAIF.Presentation.Web.Controls.PopUps.Infragistics111
reference_type: package
operation_id: OP-5
trigger: Hosting page sets Active, TaskID, NoteCategoryCode/Descr, MemoTypeCodes.
---

# PolicyActivityPopup note capture

This operation captures a Category/Type (with a free-form override) and note text for a Policy Activity note, and offers an optional Save-and-Email confirmation path.

| Field | Value |
| --- | --- |
| **Operation ID** | OP-5 |
| **Trigger** | Hosting page sets `Active`, `TaskID`, `NoteCategoryCode`/`Descr`, `MemoTypeCodes` collection. |
| **Inputs** | `TaskID`, `NoteCategoryCode`, `NoteCategoryDescr`, `NoteText`, `MemoTypeCodes` |
| **Outputs** | `ConfirmAction(Confirm, PolicyNoteEventArgs)` |
| **Primary components** | `PolicyActivityPopup.CreateChildControls`, `PolicyActivityPopup.RaiseCallbackEvent`, `PolicyActivityPopup.GetCallbackResult`, `PolicyActivityPopup.SaveButtonClick`, `PolicyActivityPopup.SaveEmailButtonClick` |
| **Entry point** | `SAIF.Presentation.Web.Controls.PopUps.Infragistics111\PolicyActivityPopup.vb` |

## Steps

1. `CreateChildControls()` parses the ASCX, resolves title/category labels, and (if `Active`) binds `ddlType` from the caller-supplied `MemoTypeCodes` collection; wires a client callback (`GetCallbackEventReference`) so that changing the Type dropdown invokes `CheckForFreeForm` client-side and posts the selected code back through `ICallbackEventHandler`.
2. `RaiseCallbackEvent(eventArgument)` stores the posted type code into `NoteTypeCode`; `GetCallbackResult()` returns it back to the client script.
3. Client-side `CheckForFreeForm` shows/hides a "Freeform" text box when the special type code `"FF"` is selected.
4. `Render()` populates `txtNoteText` from `NoteText`, positions the popup, sets the category description label, enables the Type dropdown, and focuses `ddlType`.
5. On Save (`SaveButtonClick`) or Save-and-Email (`SaveEmailButtonClick`):
   - Reads the free-form text (if present) or the dropdown's display text as `typeText`.
   - Raises `ConfirmAction(True, New PolicyNoteEventArgs(TaskID, NoteCategoryCode, typeText, noteText, sendEmail))` — `sendEmail` is `True` only for the Save-and-Email path.
6. On Cancel, raises `ConfirmAction(False, New PolicyNoteEventArgs(TaskID, "", "", "", False))`.

## Process flow

The following diagram visualizes the policy-activity note capture flow.

```mermaid
flowchart TD
	Start([Hosting page sets Active = True]) --> Create[CreateChildControls binds MemoTypeCodes]
	Create --> Type{User changes Type dropdown}
	Type -->|FF selected| FreeForm[Show Freeform text box via CheckForFreeForm callback]
	Type -->|Other| Render[Render popup]
	FreeForm --> Render
	Render --> Action{Save, Save+Email, or Cancel}
	Action -->|Save| Confirm([ConfirmAction True, sendEmail = False])
	Action -->|Save+Email| ConfirmEmail([ConfirmAction True, sendEmail = True])
	Action -->|Cancel| Cancel([ConfirmAction False, empty args])
```

## Failure and edge-case behavior

- No explicit validation is performed on the note text or type selection beyond the free-form toggle before raising `ConfirmAction`*.

## Related documentation
- [Operations and processes](../operations-processes.md)
- [Business rules](../business-rules.md)

## Sources
- `SAIF.Presentation.Web.Controls.PopUps.Infragistics111\PolicyActivityPopup.vb`
- `SAIF.Presentation.Web.Controls.PopUps.Infragistics111\PolicyActivityPopup.ascx`
